﻿Imports System.Data.SqlClient
Imports IRSO6.Datos
Imports IRSO6.Login
Imports Microsoft.VisualBasic.Logging
Imports System.Net
Imports System.Web.Services




Public Class Ticket


    Inherits System.Web.UI.Page
    Public reader As SqlDataReader



    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session.Item("usuario") Is Nothing Then
            Response.Redirect("/Login.aspx")
            Response.Write("Sesion Invalida")
        Else
            NombreUsuario.Text = Session.Item("usuario")


        End If
        CargarCombos()


    End Sub

    Public Sub CargarCombos()
        Dim Data As New Datos
        Dim dt As New DataTable
        Dim Conn As New SqlConnection(Data.Sconn)
        Conn.Open()
        Dim adapter As New SqlDataAdapter("SELECT PRIORIDAD_ID,DESCRIPCION FROM PRIORIDADES", Conn)
        adapter.Fill(dt)
        PrioridadList.DataSource = dt
        PrioridadList.DataValueField = "prioridad_ID"
        PrioridadList.DataTextField = "DESCRIPCION"
        PrioridadList.DataBind()
        dt.Clear()
        Dim adapter2 As New SqlDataAdapter("SELECT ESTADO_ID,DESCRIPCION FROM ESTADOS", Conn)
        adapter2.Fill(dt)
        EstadosList.DataSource = dt
        EstadosList.DataValueField = "ESTADO_ID"
        EstadosList.DataTextField = "DESCRIPCION"
        EstadosList.DataBind()
        dt.Clear()
        Dim adapter3 As New SqlDataAdapter("SELECT TIPO_ID,DESCRIPCION FROM TIPOS", Conn)
        adapter3.Fill(dt)
        TipoList.DataSource = dt
        TipoList.DataValueField = "TIPO_ID"
        TipoList.DataTextField = "DESCRIPCION"
        TipoList.DataBind()
        Conn.Close()
    End Sub

    Protected Sub PrioridadList_SelectedIndexChanged(sender As Object, e As EventArgs) Handles PrioridadList.SelectedIndexChanged

    End Sub

   
End Class